//
//  UIButton+EL.h
//  JTProject
//
//  Created by Yuki on 2021/3/9.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^EL_ClickCurrenBtnBlock)(UIButton *currentBtn);
@interface UIButton (EL)
#pragma mark - --------- 创建按钮  ---------
/// 创建按钮
/// @param titleStr 标题
/// @param titleFont 标题字体
/// @param titleColor 标题颜色
+ (UIButton *)el_createButtonWithTitle:(NSString *)titleStr
                             titleFont:(UIFont *)titleFont
                            titleColor:(UIColor *)titleColor;

/// 创建按钮
/// @param titleStr 标题
/// @param titleFont 标题字体
/// @param titleColor 标题颜色
/// @param traget action的执行者
/// @param action 点击事件
+ (UIButton *)el_createButtonWithTitle:(NSString *)titleStr
                             titleFont:(UIFont *)titleFont
                            titleColor:(UIColor *)titleColor
                                traget:(id)traget
                                action:(SEL)action;

/// 创建按钮
/// @param titleStr 标题
/// @param titleFont 标题字体
/// @param titleColor 标题颜色
/// @param actionBlock 标题点击事件回调
+ (UIButton *)el_createButtonWithTitle:(NSString *)titleStr
                             titleFont:(UIFont *)titleFont
                            titleColor:(UIColor *)titleColor
                           actionBlock:(EL_ClickCurrenBtnBlock)actionBlock;



#pragma mark - --------- 点击当前的按钮  ---------
/**  点击当前的按钮  **/
@property (nonatomic , copy)EL_ClickCurrenBtnBlock  clickCurrentBtnBlock;



#pragma mark - --------- 设置网络图片  ---------
- (void)sd_setFadeImageWithURL:(NSURL *)url forState:(UIControlState)state  placeholderImage:(UIImage *)placeholder;

- (void)sd_setFadeImageWithURL:(NSURL *)url forState:(UIControlState)state;
@end

NS_ASSUME_NONNULL_END
